/* ===================================================================
   客户档案管理模块专用样式
   基于Apple Design System的CRM客户管理界面
   版本：v1.0
   创建时间：2025-07-20
=================================================================== */

/* 整体布局 */
body {
    background-color: var(--system-grouped-background);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航栏 */
.top-navbar {
    background-color: var(--system-background);
    border-bottom: 1px solid var(--separator-non-opaque);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-6);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--font-size-headline);
    font-weight: var(--font-weight-semibold);
    color: var(--label-primary);
}

.nav-brand i {
    color: var(--apple-blue);
    font-size: 20px;
}

.nav-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--font-size-subhead);
    color: var(--label-secondary);
}

.breadcrumb-item.active {
    color: var(--label-primary);
    font-weight: var(--font-weight-medium);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}

.nav-button {
    position: relative;
    background: none;
    border: none;
    padding: var(--spacing-2);
    color: var(--label-secondary);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.nav-button:hover {
    background-color: var(--fill-quaternary);
    color: var(--label-primary);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--apple-red);
    color: white;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    padding: 2px 5px;
    border-radius: var(--radius-full);
    min-width: 16px;
    text-align: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--radius-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-menu:hover {
    background-color: var(--fill-quaternary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.user-name {
    font-size: var(--font-size-subhead);
    font-weight: var(--font-weight-medium);
    color: var(--label-primary);
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 240px;
    height: calc(100vh - 60px);
    background-color: var(--system-background);
    border-right: 1px solid var(--separator-non-opaque);
    overflow-y: auto;
    z-index: var(--z-fixed);
}

.sidebar-content {
    padding: var(--spacing-4);
}

.sidebar-section {
    margin-bottom: var(--spacing-6);
}

.sidebar-title {
    font-size: var(--font-size-caption-1);
    font-weight: var(--font-weight-semibold);
    color: var(--label-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-3);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin-bottom: var(--spacing-1);
}

.menu-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-2) var(--spacing-3);
    color: var(--label-secondary);
    text-decoration: none;
    border-radius: var(--radius-medium);
    transition: all var(--transition-fast);
    font-size: var(--font-size-subhead);
    font-weight: var(--font-weight-medium);
}

.menu-link:hover {
    background-color: var(--fill-quaternary);
    color: var(--label-primary);
}

.menu-item.active .menu-link {
    background-color: var(--apple-blue);
    color: white;
}

.menu-link i {
    width: 16px;
    text-align: center;
}

/* 主内容区 */
.main-content {
    margin-left: 240px;
    padding: var(--spacing-6);
    min-height: calc(100vh - 60px);
}

/* 页面头部 */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--spacing-8);
}

.header-left h1 {
    font-size: var(--font-size-large-title);
    font-weight: var(--font-weight-bold);
    color: var(--label-primary);
    margin-bottom: var(--spacing-1);
}

.page-subtitle {
    font-size: var(--font-size-subhead);
    color: var(--label-secondary);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

/* 搜索和筛选区域 */
.search-filter-section {
    background-color: var(--system-background);
    border-radius: var(--radius-large);
    padding: var(--spacing-4);
    margin-bottom: var(--spacing-6);
    box-shadow: var(--shadow-small);
}

.search-filter-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
}

.search-box {
    position: relative;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: var(--spacing-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--label-tertiary);
    font-size: var(--font-size-subhead);
}

.search-input {
    width: 100%;
    padding: var(--spacing-3) var(--spacing-10) var(--spacing-3) var(--spacing-10);
    border: 1px solid var(--separator-opaque);
    border-radius: var(--radius-large);
    background-color: var(--system-background-secondary);
    font-size: var(--font-size-body);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.25);
}

.search-clear {
    position: absolute;
    right: var(--spacing-3);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--label-tertiary);
    cursor: pointer;
    padding: var(--spacing-1);
    border-radius: var(--radius-full);
    opacity: 0;
    transition: all var(--transition-fast);
}

.search-input:not(:placeholder-shown) + .search-clear {
    opacity: 1;
}

.search-clear:hover {
    background-color: var(--fill-quaternary);
    color: var(--label-primary);
}

.filter-controls {
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-4);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
}

.filter-label {
    font-size: var(--font-size-caption-1);
    font-weight: var(--font-weight-medium);
    color: var(--label-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: var(--spacing-2) var(--spacing-3);
    border: 1px solid var(--separator-opaque);
    border-radius: var(--radius-medium);
    background-color: var(--system-background);
    font-size: var(--font-size-subhead);
    color: var(--label-primary);
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.25);
}

/* 统计卡片 */
.stats-section {
    margin-bottom: var(--spacing-6);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-4);
}

.stat-card {
    background-color: var(--system-background);
    border-radius: var(--radius-large);
    padding: var(--spacing-4);
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    box-shadow: var(--shadow-small);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-large);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-icon.stat-primary {
    background-color: var(--apple-blue);
}

.stat-icon.stat-success {
    background-color: var(--apple-green);
}

.stat-icon.stat-warning {
    background-color: var(--apple-orange);
}

.stat-icon.stat-info {
    background-color: var(--apple-purple);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: var(--font-size-title-2);
    font-weight: var(--font-weight-bold);
    color: var(--label-primary);
    line-height: 1;
    margin-bottom: var(--spacing-1);
}

.stat-label {
    font-size: var(--font-size-subhead);
    color: var(--label-secondary);
    margin-bottom: var(--spacing-1);
}

.stat-change {
    font-size: var(--font-size-caption-1);
    font-weight: var(--font-weight-medium);
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
}

.stat-change.positive {
    color: var(--apple-green);
}

.stat-change.negative {
    color: var(--apple-red);
}

/* 表格区域 */
.table-section {
    background-color: var(--system-background);
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-small);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-4);
    border-bottom: 1px solid var(--separator-non-opaque);
    background-color: var(--system-background-secondary);
}

.table-title h2 {
    font-size: var(--font-size-title-3);
    font-weight: var(--font-weight-semibold);
    color: var(--label-primary);
    margin: 0 0 var(--spacing-1) 0;
}

.result-count {
    font-size: var(--font-size-caption-1);
    color: var(--label-secondary);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.view-toggle {
    display: flex;
    border-radius: var(--radius-medium);
    overflow: hidden;
    border: 1px solid var(--separator-opaque);
}

.view-btn {
    background: none;
    border: none;
    padding: var(--spacing-2) var(--spacing-3);
    color: var(--label-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-btn.active {
    background-color: var(--apple-blue);
    color: white;
}

.view-btn:not(.active):hover {
    background-color: var(--fill-quaternary);
}

/* 客户表格 */
.table-container {
    overflow-x: auto;
}

.customer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-subhead);
}

.customer-table th {
    padding: var(--spacing-3) var(--spacing-4);
    text-align: left;
    font-weight: var(--font-weight-semibold);
    color: var(--label-secondary);
    background-color: var(--system-background-secondary);
    border-bottom: 1px solid var(--separator-non-opaque);
    white-space: nowrap;
}

.customer-table td {
    padding: var(--spacing-3) var(--spacing-4);
    border-bottom: 1px solid var(--separator-non-opaque);
    vertical-align: middle;
}

.customer-table tr:hover {
    background-color: var(--fill-quaternary);
}

.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable:hover {
    color: var(--label-primary);
}

.sortable i {
    margin-left: var(--spacing-1);
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.sortable:hover i {
    opacity: 1;
}

/* 客户信息样式 */
.customer-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.customer-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background-color: var(--apple-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-subhead);
}

.customer-details .name {
    font-weight: var(--font-weight-medium);
    color: var(--label-primary);
    margin-bottom: 2px;
}

.customer-details .phone {
    font-size: var(--font-size-caption-1);
    color: var(--label-secondary);
}

/* 徽章样式 */
.gender-badge {
    padding: 2px var(--spacing-2);
    border-radius: var(--radius-small);
    font-size: var(--font-size-caption-1);
    font-weight: var(--font-weight-medium);
}

.gender-badge.male {
    background-color: rgba(0, 122, 255, 0.1);
    color: var(--apple-blue);
}

.gender-badge.female {
    background-color: rgba(255, 45, 146, 0.1);
    color: var(--apple-pink);
}

.status-badge {
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--radius-small);
    font-size: var(--font-size-caption-1);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.status-badge.status-active {
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--apple-green);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.status-badge.status-potential {
    background-color: rgba(0, 122, 255, 0.1);
    color: var(--apple-blue);
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.status-badge.status-deal {
    background-color: rgba(255, 149, 0, 0.1);
    color: var(--apple-orange);
    border: 1px solid rgba(255, 149, 0, 0.2);
}

.status-badge.status-inactive {
    background-color: var(--fill-secondary);
    color: var(--label-secondary);
    border: 1px solid var(--separator-opaque);
}

.health-badge {
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--radius-small);
    font-size: var(--font-size-caption-1);
    font-weight: var(--font-weight-medium);
}

.health-badge.health-good {
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--apple-green);
}

.health-badge.health-normal {
    background-color: rgba(255, 204, 0, 0.1);
    color: var(--apple-yellow);
}

.health-badge.health-poor {
    background-color: rgba(255, 149, 0, 0.1);
    color: var(--apple-orange);
}

.health-badge.health-bad {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--apple-red);
}

/* 标签样式 */
.tag-list {
    display: flex;
    gap: var(--spacing-1);
    flex-wrap: wrap;
}

.tag {
    padding: 2px var(--spacing-2);
    border-radius: var(--radius-small);
    font-size: 10px;
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.tag.tag-vip {
    background-color: rgba(255, 107, 53, 0.1);
    color: #FF6B35;
}

.tag.tag-quality {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.tag.tag-normal {
    background-color: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.tag.tag-health {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.tag.tag-careful {
    background-color: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.tag.tag-care {
    background-color: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

/* 操作按钮 */
.actions-column {
    width: 120px;
}

.action-buttons {
    display: flex;
    gap: var(--spacing-1);
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--label-secondary);
    cursor: pointer;
    border-radius: var(--radius-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    background-color: var(--fill-quaternary);
    color: var(--apple-blue);
}

/* 分页 */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-4);
    border-top: 1px solid var(--separator-non-opaque);
    background-color: var(--system-background-secondary);
}

.pagination-info {
    font-size: var(--font-size-subhead);
    color: var(--label-secondary);
}

.pagination {
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
}

.page-btn {
    min-width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--label-secondary);
    cursor: pointer;
    border-radius: var(--radius-medium);
    font-size: var(--font-size-subhead);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
    background-color: var(--fill-quaternary);
    color: var(--label-primary);
}

.page-btn.active {
    background-color: var(--apple-blue);
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-dots {
    padding: 0 var(--spacing-2);
    color: var(--label-tertiary);
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--font-size-subhead);
    color: var(--label-secondary);
}

.page-size-selector select {
    padding: var(--spacing-1) var(--spacing-2);
    border: 1px solid var(--separator-opaque);
    border-radius: var(--radius-small);
    background-color: var(--system-background);
    color: var(--label-primary);
}

/* 操作菜单 */
.action-menu {
    background-color: var(--system-background);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-large);
    padding: var(--spacing-2);
    min-width: 200px;
    transform: scale(0.9) translateY(-10px);
    transition: all var(--transition-fast);
}

.modal-overlay.show .action-menu {
    transform: scale(1) translateY(0);
}

.action-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-3);
    border: none;
    background: none;
    color: var(--label-primary);
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-medium);
    transition: all var(--transition-fast);
}

.action-menu-item:hover {
    background-color: var(--fill-quaternary);
}

.action-menu-item.danger {
    color: var(--apple-red);
}

.action-menu-item.cancel {
    color: var(--label-secondary);
    border-top: 1px solid var(--separator-non-opaque);
    margin-top: var(--spacing-2);
    padding-top: var(--spacing-3);
}

.action-menu-item i {
    width: 16px;
    text-align: center;
}

/* 客户卡片网格视图 */
.grid-container {
    padding: var(--spacing-4);
}

.customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-4);
}

.customer-card {
    background-color: var(--system-background);
    border: 1px solid var(--separator-non-opaque);
    border-radius: var(--radius-large);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    box-shadow: var(--shadow-small);
}

.customer-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--apple-blue);
}

/* 卡片头部 */
.card-header {
    padding: var(--spacing-4);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-3);
    background: linear-gradient(135deg, var(--system-background) 0%, var(--system-background-secondary) 100%);
    border-bottom: 1px solid var(--separator-non-opaque);
}

.customer-avatar.large {
    width: 48px;
    height: 48px;
    font-size: var(--font-size-headline);
    font-weight: var(--font-weight-bold);
}

.customer-basic {
    flex: 1;
    min-width: 0;
}

.customer-basic .customer-name {
    font-size: var(--font-size-headline);
    font-weight: var(--font-weight-semibold);
    color: var(--label-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-basic .customer-number {
    font-size: var(--font-size-caption-1);
    color: var(--label-secondary);
    font-family: var(--font-mono);
}

.card-actions {
    display: flex;
    gap: var(--spacing-1);
    flex-shrink: 0;
}

.card-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background-color: var(--fill-tertiary);
    color: var(--label-secondary);
    border-radius: var(--radius-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 12px;
}

.card-action-btn:hover {
    background-color: var(--apple-blue);
    color: white;
    transform: scale(1.05);
}

/* 卡片主体 */
.card-body {
    padding: var(--spacing-4);
}

.card-content {
    display: flex;
    gap: var(--spacing-4);
    align-items: flex-start;
}

.customer-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
    min-width: 0;
}

.customer-meta {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--font-size-subhead);
    color: var(--label-secondary);
}

.meta-item i {
    width: 16px;
    color: var(--label-tertiary);
    font-size: 12px;
    flex-shrink: 0;
}

.customer-status {
    display: flex;
    gap: var(--spacing-2);
    flex-wrap: wrap;
}

.customer-tags {
    display: flex;
    gap: var(--spacing-1);
    flex-wrap: wrap;
}

/* 客户照片区域 */
.customer-photo-section {
    flex-shrink: 0;
}

.customer-photo {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-large);
    overflow: hidden;
    border: 2px solid var(--separator-non-opaque);
    background-color: var(--system-background-secondary);
    transition: all var(--transition-fast);
}

.customer-photo:hover {
    border-color: var(--apple-blue);
    transform: scale(1.02);
}

.photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity var(--transition-fast);
}

.photo-img:error {
    opacity: 0;
}

.photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--fill-secondary) 0%, var(--fill-tertiary) 100%);
    color: var(--label-tertiary);
    font-size: 24px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.photo-img:error + .photo-placeholder,
.customer-photo:not(:has(.photo-img)) .photo-placeholder {
    opacity: 1;
}

/* 照片加载动画 */
.photo-img {
    animation: photoFadeIn 0.3s ease-out;
}

@keyframes photoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 卡片底部 */
.card-footer {
    padding: var(--spacing-3) var(--spacing-4);
    background-color: var(--system-background-secondary);
    border-top: 1px solid var(--separator-non-opaque);
    display: flex;
    gap: var(--spacing-2);
}

.card-footer-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-3);
    border: none;
    border-radius: var(--radius-medium);
    font-size: var(--font-size-subhead);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.card-footer-btn.primary {
    background-color: var(--apple-blue);
    color: white;
}

.card-footer-btn.primary:hover {
    background-color: var(--apple-blue-darker);
    transform: translateY(-1px);
}

.card-footer-btn.secondary {
    background-color: var(--fill-secondary);
    color: var(--label-primary);
    border: 1px solid var(--separator-opaque);
}

.card-footer-btn.secondary:hover {
    background-color: var(--fill-tertiary);
    border-color: var(--apple-blue);
    color: var(--apple-blue);
}

.card-footer-btn i {
    font-size: 12px;
}

/* 视图切换动画 */
.table-container,
.grid-container {
    transition: all var(--transition-normal);
}

.table-container.fade-out,
.grid-container.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

/* 网格视图响应式设计 */
@media (max-width: 1200px) {
    .customer-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--spacing-3);
    }
}

@media (max-width: 768px) {
    .customer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-3);
    }
    
    .card-header {
        padding: var(--spacing-3);
    }
    
    .card-body {
        padding: var(--spacing-3);
    }
    
    .card-content {
        gap: var(--spacing-3);
    }
    
    .customer-avatar.large {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-title-3);
    }
    
    .customer-basic .customer-name {
        font-size: var(--font-size-title-3);
    }
    
    .customer-photo {
        width: 60px;
        height: 60px;
    }
    
    .photo-placeholder {
        font-size: 18px;
    }
    
    .card-footer {
        padding: var(--spacing-2) var(--spacing-3);
        flex-direction: column;
    }
    
    .card-footer-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .grid-container {
        padding: var(--spacing-2);
    }
    
    .customer-grid {
        gap: var(--spacing-2);
    }
    
    .card-content {
        gap: var(--spacing-2);
    }
    
    .customer-meta {
        gap: var(--spacing-1);
    }
    
    .meta-item {
        font-size: var(--font-size-caption-1);
    }
    
    .customer-status,
    .customer-tags {
        gap: var(--spacing-1);
    }
    
    .customer-photo {
        width: 50px;
        height: 50px;
    }
    
    .photo-placeholder {
        font-size: 16px;
    }
    
    .card-footer-btn {
        padding: var(--spacing-2);
        font-size: var(--font-size-caption-1);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        padding: var(--spacing-4);
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 var(--spacing-3);
    }
    
    .nav-breadcrumb {
        display: none;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-4);
    }
    
    .header-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .search-filter-container {
        gap: var(--spacing-3);
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        font-size: var(--font-size-caption-1);
    }
    
    .customer-table th,
    .customer-table td {
        padding: var(--spacing-2);
    }
    
    .customer-avatar {
        width: 28px;
        height: 28px;
        font-size: var(--font-size-caption-1);
    }
    
    .pagination-container {
        flex-direction: column;
        gap: var(--spacing-3);
        align-items: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: var(--spacing-3);
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .table-header {
        flex-direction: column;
        gap: var(--spacing-3);
        align-items: flex-start;
    }
    
    .table-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .customer-info {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-2);
    }
    
    .tag-list {
        flex-direction: column;
        align-items: flex-start;
    }
}